1. Field of the Invention
The present invention relates to an image processing apparatus and method suitable for performing a process of expanding and reproducing compressed image data used by an image signal recording/reproducing apparatus, and to a computer readable storage medium storing processes for realizing such a method.
2. Related Background Art
Digital image data is generally compressed in the unit of block by utilizing DCT (Discrete Cosine Transform) of JPEG (Joint Photographic Expert Group) or the like. In order to expand and display data compressed through DCT, it is necessary to block-to-raster convert the expanded data. In order to perform a block/raster conversion, it is necessary to use a conversion memory having a minimum capacity of Haxc3x978 (lines) words where Ha is the number of horizontal pixels of image data. Although the size of image data capable of being expanded has been limited by the size of the conversion memory, a method has been proposed by which image data having an arbitrary pixel size can be expanded independently from the size of a conversion memory.
FIG. 1 is a block diagram showing an example of a conventional image processing apparatus for expanding image data having an arbitrary pixel size. In FIG. 1, reference numeral 2001 represents a recording medium such as a memory card, reference numeral 2002 represents an interface (I/F) circuit for the recording medium, reference numeral 2003 represents an expansion circuit for expanding JPEG data in the unit of block, reference numeral 2004 represents a block/raster converting circuit for converting expanded data from blocks to rasters, reference numeral 2005 represents a buffer memory for block/raster conversion having a size of Haxc3x978 words, reference numeral 2007 represents a DRAM for storing expanded image data, and reference numeral 2006 represents a controller for controlling DRAM 2007.
In reproducing JPEG data stored in the recording medium 2001, compressed data read via the I/F circuit 2002 is first expanded by the expansion circuit 2003 to form expanded image data in the block sequential order. The expanded image data is written in the buffer memory 2005 in the block sequential order by the block/raster converting circuit 2004, and read in the raster sequential order to thereby convert the block image data into raster image data which is stored in DRAM 2007 under the control of the memory controller 2006.
FIG. 2 illustrates a concept of a process to be executed for DRAM 2007 when Hp is larger than Ha. For example, if Hp=1024 and Ha=640, as shown in FIG. 2 the image data is divided into blocks each having a size of 640 pixelsxc3x978 lines or a size of 384xc3x978 lines and expanded. Namely, the expansion circuit 2003 expands image data of MCU (Minimum Code Unit) of 640xc3x978 lines, and the block/raster converting circuit 2004 writes the expanded image data into the buffer memory 2005 to perform a block/raster conversion process. The DRAM controller 2006 writes raster image data having a size of 640 pixelsxc3x978 lines starting from a pointer P1 shown in FIG. 2 in a raster 1 area. After the next image data of 384 pixelsxc3x978 lines is expanded and written in the buffer memory 2005, a block/raster conversion is performed and the DRAM controller 2006 writes raster image data having a size of 384 pixelsxc3x978 lines starting from a pointer P2 shown in FIG. 2 in a raster 2 area. Thereafter, a raster 3, a raster 4, a raster 5, . . . are sequentially processed in a similar manner. In this way, image data having an arbitrary pixel size can be expanded independently from the size of the buffer memory 2005.
However, the above-described conventional apparatus does not take into consideration the case wherein image data of non-square pixels are converted into image data of square pixels. Still further, it does not consider the case wherein image data is required to be expanded or reduced to about 760xc3x97490 pixels in order to display expanded image data on a TV or the like. More specifically, if image data is to be expanded to 1024xc3x97786 pixels, the data amount is 1024xc3x97768xc3x972xc3x978=12582912 (bits), whereas if image data is to be expanded to 2048xc3x971536 pixels, the data amount is 50331648 (bits). This data amount of a memory (DRAM) is very large as compared to about 4 Mbit necessary for image data display. Because of such a large memory and a number of accesses to DRAM, the efficiency of the apparatus is very poor in terms of a processing speed, a consumption power, and a cost.
Under the above-described background of the invention, it is an object of the present invention to provide an image processing apparatus and method capable of expanding, varying and reproducing encoded image data having an arbitrary size at high speed by using a memory of a smaller capacity, and to provide a computer readable storage medium storing processes realizing such a method.
In order to achieve the above object of the invention, a preferred embodiment provides an image processing method comprising the steps of: sequentially inputting image data encoded in each of block units; decoding the encoded image data in each of the block units; converting the decoded image data in a block scan sequential order into image data in a raster scan sequential order, the converting step performing a conversion process by dividing the decoded image data in a horizontal direction and outputting the divided image data obtained by the conversion process; and varying the divided image data obtained by the conversion process.
Another preferred embodiment provides a computer readable storage medium which stores a program comprising: an input process of sequentially inputting image data encoded in each of block units; a decoding process of decoding the encoded image data in each of the block units; a converting process of converting the decoded image data in a block scan sequential order into image data in a raster scan sequential order, the converting process performing a conversion process by dividing the decoded image data in a horizontal direction and outputting the divided image data obtained by the conversion process; and a varying process of the divided image data obtained by the conversion process.
Other objects, features and advantages of the invention will become apparent from the following detailed description taken in conjunction with the accompanying drawings.